package com.tn.service.weigh;

import com.tn.controller.alarm.common.model.CommonVO;
import com.tn.controller.alarm.common.model.PageInput;
import com.tn.controller.alarm.common.model.PageResult;
import com.tn.controller.alarm.common.model.weigh.vo.WeighLogInfoVO;
import com.tn.controller.alarm.common.model.weigh.vo.WeighLogQueryVO;
import com.tn.exception.DatabaseOperationFailedException;
import org.springframework.web.bind.annotation.RequestBody;


import java.util.Map;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 磅房Service
 *
 * @program: tn_aucy_java
 * @author: yangjiayao
 * @create: 2021/11/16
 */
public interface IWeighService {
    /**
     * 查询磅房当前信息
     *
     * @param curPage  当前页
     * @param pageSize 页长
     * @return 磅房当前信息
     */
    CommonVO<List<WeighLogInfoVO>> currentWeighInfo();

    /**
     * 查询磅房日志信息
     *
     * @param curPage  当前页
     * @param pageSize 页长
     * @param queryVO  查询条件
     * @return 磅房日志信息
     */
    CommonVO<PageResult<WeighLogInfoVO>> getWeighLogInfo(Integer curPage, Integer pageSize, WeighLogQueryVO queryVO);



    CommonVO<PageResult<WeighLogInfoVO>> queryWeighLogInfo(Integer curPage, Integer pageSize, WeighLogQueryVO queryVO);

    /**
     * 按查询条件查询磅房日志信息
     *
     * @param request  查询条件
     * @param response  response
     * @return 磅房日志信息
     */
    void exportWeighLogInfo(HttpServletRequest request, HttpServletResponse response,WeighLogQueryVO queryVO) throws IOException ;

    /**
     * 预览明细
     * @param queryVO
     * @return
     */
    PageResult<WeighLogInfoVO> onlineShowExcelPreview(PageInput<WeighLogQueryVO> queryVO);

    /**
     * 修改车牌
     *
     * @param truckId 识别的车牌
     * @param modifyLicense 修改的车牌
     */
    void modifyLicense(String truckId, String modifyLicense)
            throws DatabaseOperationFailedException;

    Map<String, Object> stamp(Map<String,String> map) throws Exception;

    /**
     * 查询汇总的情况
     * @param queryVO 查询条件
     * @return
     */
    CommonVO<List<WeighLogInfoVO>> queryWeightSum( WeighLogQueryVO queryVO);
    /**
     * 查询汇总的情况导出
     * @param request 查询条件
     * @param response 查询条件
     * @param queryVO 查询条件
     * @return
     */
    void exportQueryWeightSum(HttpServletRequest request, HttpServletResponse response,WeighLogQueryVO queryVO) throws IOException;

    /**
     * 查询汇总条件筛选的情况
     * @return
     */
    CommonVO<Map<String,List<String>>> queryWeightSumCondition();

    Map query(String licence);



}
